<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>物业管理软件</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="description" content="Charisma, a fully featured, responsive, HTML5, Bootstrap admin template.">
	<meta name="author" content="Muhammad Usman">
    <#include "*/pubcss.ftl">
</head>

<body>
	<#include "*/top.ftl">
	<!-- topbar ends -->
	<div class="container-fluid">
		<div class="row-fluid">
			<#include "*/left.ftl">
			<div id="content" class="span10">
			<!-- content starts -->
			<div>
				<ul class="breadcrumb">
					<li>
						<a href="#">基础资料</a> <span class="divider">/</span>
					</li>
					<li>
						<a href="#">住户管理</a> <span class="divider">/</span>
					</li>
					<li>
						<a href="#">住户维护</a>
					</li>
				</ul>
			</div>
		    <form class="form-horizontal"  action="javascript:saveResidents()">
		    <div class="row-fluid sortable">
				<button type="button" class="btn btn-primary" onclick="javascript:window.history.back();">返回</button>
		    </div>
			<div class="row-fluid sortable">		
				<div class="box span12">
					<div class="box-header well" data-original-title>
						<h2><i class="icon-user"></i>住户信息</h2>
					</div>
					<div class="box-content">
						<div class="row-fluid">
							<div class="span6">
							   <fieldset>
								<div class="control-group form-horizontal">
								   <label class="control-label" for="focusedInput">房号</label>
									<div class="controls">
									    <input class="input-xlarge focused" disabled id="rcode" name="rcode" type="hidden" value="${(residents.rcode)?if_exists}">
									    <input class="input-xlarge focused" disabled id="rid" name="rid" type="hidden" value="${(room.rid)?if_exists}">
										<input class="input-xlarge focused" disabled id="room_rcode" name="room_rcode"type="text" value="${(room.rcode)?if_exists}(${(room.unit.ban.community.cname)?if_exists}${(room.unit.ban.bname)?if_exists}${(room.unit.uname)?if_exists})">
									</div>
								</div>
								</fieldset> 
							</div>
							<div class="span6">
							   <div class="control-group form-horizontal">
								<label class="control-label">状态</label>
								<div class="controls form-horizontal">
								      <#assign statesign=((residents.state)?if_exists=='0')>
									  <label class="radio">
										<input type="radio" name="state" id="state" disabled value="0" ${statesign?string('checked','')}>
										在住
									  </label>
									  <label class="radio">
										<input type="radio" name="state" id="state" disabled value="1" ${statesign?string('','checked')}>
										离开
							          </label>
								</div>
							  </div>
							</div>
                        </div>
						<div class="row-fluid">
							<div class="span6">
							   <fieldset>
								<div class="control-group form-horizontal">
								   <label class="control-label" for="focusedInput">户主姓名</label>
									<div class="controls">
										<input class="input-xlarge focused" id="rname" disabled name="rname" type="text" value="${(residents.rname)?if_exists}">
									</div>
								</div>
								</fieldset> 
							</div>
							<div class="span6">
							   <div class="control-group form-horizontal">
								<label class="control-label">性别</label>
								<div class="controls form-horizontal">
								      <label class="radio">
								       <#assign sexsign=((residents.sex)?if_exists=='0')>
										<input type="radio" name="sex" id="sex" disabled value="0" ${sexsign?string('checked','')}>
										男
									  </label>
									  <label class="radio">
										<input type="radio" name="sex" id="sex" disabled value="1" ${sexsign?string('','checked')}>
										女
							          </label>
								</div>
							  </div>
							</div>
                        </div>
						<div class="row-fluid">
							<div class="span6">
							   <fieldset>
								<div class="control-group form-horizontal">
								   <label class="control-label" for="focusedInput">身份证号</label>
									<div class="controls">
										<input class="input-xlarge focused" id="icard" disabled name="icard" type="text" value="${(residents.icard)?if_exists}">
									</div>
								</div>
								</fieldset> 
							</div>
							<div class="span6">
							   <div class="control-group form-horizontal">
								<label class="control-label">参加工作时间</label>
								<div class="controls form-horizontal">
								  <input class="input-xlarge focused" id="worktime" disabled name="worktime" type="text" value="${(residents.worktime)?if_exists}">
								</div>
							  </div>
							</div>
                        </div>
						<div class="row-fluid">
							<div class="span6">
							   <fieldset>
								<div class="control-group form-horizontal">
								   <label class="control-label" for="focusedInput">联系电话</label>
									<div class="controls">
										<input class="input-xlarge focused" id="tel" disabled name="tel" type="text" value="${(residents.tel)?if_exists}">
									</div>
								</div>
								</fieldset> 
							</div>
							<div class="span6">
							   <div class="control-group form-horizontal">
								<label class="control-label">离退休时间</label>
								<div class="controls">
								  <input class="input-xlarge focused" id="txtime" disabled name="txtime" type="text" value="${(residents.txtime)?if_exists}">
								</div>
							  </div>
							</div>
                        </div>
						<div class="row-fluid">
							<div class="span6">
							   <fieldset>
								<div class="control-group form-horizontal">
								   <label class="control-label" for="focusedInput">住房性质</label>
									<div class="controls form-horizontal">
									  <select id="hpid" name="hpid" disabled>
									     <#list (housingPropertys)?if_exists as prop>
									       <#assign hpsign=((residents.property.hpid)?if_exists==prop.hpid)>
									       <option value="${(prop.hpid)?if_exists}" ${hpsign?string('selected','')}>${(prop.hpname)?if_exists}</option>
									     </#list> 
									  </select>
									</div>
								</div>
								</fieldset> 
							</div>
							<div class="span6">
							   <div class="control-group form-horizontal">
								<label class="control-label">工作单位</label>
								<div class="controls">
								  <input class="input-xlarge focused" id="company" disabled name="company" type="text" value="${(residents.company)?if_exists}">
								</div>
							  </div>
							</div>
                        </div>
						<div class="row-fluid">
							<div class="span6">
							   <fieldset>
								<div class="control-group form-horizontal">
								   <label class="control-label" for="focusedInput">产权情况</label>
									<div class="controls form-horizontal">
									  <input class="input-xlarge focused" id="cqqk" disabled name="cqqk" type="text" value="${(residents.cqqk)?if_exists}">
									</div>
								</div>
								</fieldset> 
							</div>
							<div class="span6">
							   <div class="control-group form-horizontal">
								<label class="control-label">购房款</label>
								<div class="controls">
								  <input class="input-xlarge focused" id="gfk" name="gfk" disabled type="text" value="${(residents.gfk)?if_exists}">
								</div>
							  </div>
							</div>
                        </div>
                        <div class="row-fluid">
							<div class="span6">
							   <fieldset>
								<div class="control-group form-horizontal">
								   <label class="control-label" for="focusedInput">家庭人口</label>
									<div class="controls form-horizontal">
									  <input class="input-xlarge focused" id="rnum" name="rnum" type="text" value="${(residents.rnum)?if_exists}">
									</div>
								</div>
								</fieldset> 
							</div>
                        </div>
						<div class="row-fluid">
							<div class="span12">
								<div class="control-group form-horizontal">
									<label class="control-label" for="focusedInput">备注</label>
									<div class="controls">
										<textarea class="" id="ricontent" name="ricontent" disabled rows="3">${(residents.content)?if_exists}</textarea>
									</div>
								</div>
							</div>
						</div>
						<ul id="myTab" class="nav nav-tabs">
						<li class="active"><a href="#home" data-toggle="tab">水电指标</a></li>
						<li><a href="#ios" data-toggle="tab">配偶信息</a></li>
					  </ul>
					  <div id="myTabContent" class="tab-content">
						<div class="tab-pane in active" id="home">
							<table class="table table-bordered table-striped table-condensed" id="dynamictable">
							  <thead>
								  <tr>
									  <th>选择</th>
									  <th>序号</th>
									  <th>水电</th>
									  <th>指标最小值</th>
									  <th>指标最大值</th>
									  <th>单价</th>
								  </tr>
							  </thead>   
							  <tbody>
							    <#assign index=1>
								<#list (hydropowers)?if_exists as h>
								<tr>
									<td><input type="checkbox" id="inlineCheckbox1" name="ckb" value="${index}"></td>
									<td id="index">${index}</td>
									<td class="center">
									   <#assign tidsign=(h.type.tid=='001')>
									   <select name='tid' disabled>
										  <option value='001' ${tidsign?string('selected','')}>水</option>
										  <option value='002' ${tidsign?string('','selected')}>电</option>
									   </select>
									</td>
									<td class="center">
										<input class="input-small focused" disabled name="rmin" type="text" value="${(h.rmin)?if_exists}">
									</td>
									<td class="center">
										<input class="input-small focused" disabled name="rmax" type="text" value="${(h.rmax)?if_exists}">
									</td>
									<td class="center">
										<input class="input-small focused" disabled name="price" type="text" value="${(h.price)?if_exists}">
									</td>
								</tr>
								<#assign index=index+1>
								</#list>
							  </tbody>
						  </table>
						</div>
						<div class="tab-pane" id="ios">							
							<div class="row-fluid">
								<div class="span6">
								   <fieldset>
									<div class="control-group form-horizontal">
									   <label class="control-label" for="focusedInput">配偶姓名</label>
										<div class="controls">
										    <input class="input-xlarge focused" id="mid" name="mid" disabled type="hidden" value="${(member.mid)?if_exists}">
											<input class="input-xlarge focused" id="mname" name="mname" disabled type="text" value="${(member.mname)?if_exists}">
										</div>
									</div>
									</fieldset> 
								</div>
								<div class="span6">
								   <div class="control-group form-horizontal">
									<label class="control-label">性别</label>
									<div class="controls form-horizontal">
									  <label class="radio">
									  <#assign sexsign=((member.sex)?if_exists=='0')>
											<input type="radio" name="msex" id="msex" disabled value="0" ${sexsign?string('checked','')}>
											男
										  </label>
										  <label class="radio">
											<input type="radio" name="msex" id="msex" disabled value="1" ${sexsign?string('checked','')}>
											女
										  </label>
									</div>
								  </div>
								</div>
							</div>
							<div class="row-fluid">
								<div class="span6">
								   <fieldset>
									<div class="control-group form-horizontal">
									   <label class="control-label" for="focusedInput">身份证号</label>
										<div class="controls">
											<input class="input-xlarge focused" id="micard" disabled name="micard"type="text" value="${(member.icard)?if_exists}">
										</div>
									</div>
									</fieldset> 
								</div>
								<div class="span6">
								   <div class="control-group form-horizontal">
									<label class="control-label">参加工作时间</label>
									<div class="controls form-horizontal">
									  <input class="input-xlarge focused" id="mworktime" disabled name="mworktime" type="text" value="${(member.worktime)?if_exists}">
									</div>
								  </div>
								</div>
							</div>
							<div class="row-fluid">
								<div class="span6">
								   <fieldset>
									<div class="control-group form-horizontal">
									   <label class="control-label" for="focusedInput">联系电话</label>
										<div class="controls">
											<input class="input-xlarge focused" id="mtel" disabled name="mtel" type="text" value="${(member.tel)?if_exists}">
										</div>
									</div>
									</fieldset> 
								</div>
								<div class="span6">
								   <div class="control-group form-horizontal">
									<label class="control-label">离退休时间</label>
									<div class="controls">
									  <input class="input-xlarge focused" id="mtxtime" disabled name="mtxtime" type="text" value="${(member.txtime)?if_exists}">
									</div>
								  </div>
								</div>
							</div>
							<div class="row-fluid">
								<div class="span6">
								   <div class="control-group form-horizontal">
									<label class="control-label">工作单位</label>
									<div class="controls">
									  <input class="input-xlarge focused" id="mcompany" disabled name="mcompany" type="text" value="${(member.company)?if_exists}">
									</div>
								  </div>
								</div>
							</div>
							
						</div>
                      </div>
					  </div>
					</div>
				</div><!--/span-->
			
			</div><!--/row-->
            </form> 
			<!-- content ends -->
			</div><!--/#content.span10-->
		</div><!--/fluid-row-->

		
	</div><!--/.fluid-container-->
	<#include "*/infotemplate/alert.ftl">
    <#include "*/infotemplate/saveinfo.ftl">
	<#include "*/pubjs.ftl">
	<script src='${base}/script/base/residents_edit.js'></script>			
</body>
</html>
